package pers.wz.service.impl;

import pers.wz.service.IUserService;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.HashMap;
import java.util.Map;

public class UserServiceImpl extends UnicastRemoteObject implements IUserService {
    Map<String, String> userMap = new HashMap();

    public UserServiceImpl() throws RemoteException {

        userMap.put("zhangsan", "user1");
        userMap.put("lisi", "user2");

    }


    public void say() {
        System.out.println("say");
    }

    public String getUser() throws RemoteException {
        return userMap.get("zhangsan");
    }
}
